#ifndef N1PROTODATA_H_2009_09_27
#define N1PROTODATA_H_2009_09_27



#include "N1Data.h"
#include "N1Array.h"
#include "N1Number.h"
#include "N1Dictionary.h"


class N1ProtoData : protected N1Data 
{
    uint32 m_nDataSize;

    void allocSpace(uint32 bytes);


public:
    N1ProtoData() : m_nDataSize(0) {};
    virtual ~N1ProtoData() {};

    N1NAME_DECL;

    void addMemory(const void* ptr, uint32 size);
    void addByte(uint8 b);
    void addShort(uint16 s);
    void addInt(uint32 i);

    void addNumber(const N1Number *n);
    void addString(pcstr str);
    void addString(pcwstr str);
    void addData(const void* ptr, uint32 size);
    void addArray(const N1Array *array);
    void addDictionary(const N1Dictionary *dict);
};


#endif //N1PROTODATA_H_2009_09_27
